<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"
	xmlns:pe="http://primefaces.org/ui/extensions">

	<p:dialog id="banDialogId" header="Chi tiết bàn" widgetVar="banDialog" showEffect="fade" hideEffect="fade"
		resizable="false" modal="true" appendToBody="true" maximizable="true">
		<h:form id="banDetailFormId">
			<h:panelGrid id="banPanelGridId" columns="2" cellpadding="4">
				<f:facet name="header">
					<p:messages autoUpdate="true" />
				</f:facet>

				<h:outputText value="Mã số*:" />
				<p:inputText value="#{banView.editedEntity.code}" style="font-weight:bold" />

				<h:outputText value="Tên*:" />
				<p:inputText value="#{banView.editedEntity.name}" style="font-weight:bold" />

				<h:outputText value="Số chỗ ngồi:" />
				<p:inputText id="soChoNgoi" value="#{banView.editedEntity.soChoNgoi}" style="font-weight:bold">
					<pe:keyFilter for="soChoNgoi" mask="pint" />
				</p:inputText>

				<h:outputText value="Khu vực:" />
				<p:selectOneMenu value="#{banView.selectedKhuVucId}">
					<f:selectItem itemLabel="" itemValue="" />
					<f:selectItems var="kv" value="#{banView.khuVucs}" itemLabel="#{kv.name}" itemValue="#{kv.id}" />
				</p:selectOneMenu>

				<f:facet name="footer">
					<p:commandButton icon="ui-icon-disk" value="Save" action="#{banView.saveOrUpdate}" process="@form"
						update=":banListFormId:banDataTableId, @form" oncomplete="if (!args.validationFailed) banDialog.hide()">
					</p:commandButton>
					<p:commandButton icon="ui-icon-cancel" value="Cancel" immediate="true" onclick="banDialog.hide()" />
				</f:facet>
			</h:panelGrid>
		</h:form>
	</p:dialog>

</ui:composition>